#include "ThreadPool.hpp"

#include <ctime>

int main()
{
    EnableConsoleLogStrategy();
    srand(time(nullptr));

    int cnt = 10;
    while(cnt--)
    {
        int x = rand()%10 + 1;
        usleep(rand()%73);
        int y = rand() % 5 + 1;
        Task t(x, y);

        ThreadPool<Task>::GetInstance()->Enqueue(t);
        sleep(1);
    }

    sleep(2);
    ThreadPool<Task>::GetInstance()->Stop();

    ThreadPool<Task>::GetInstance()->Wait();

    return 0;
}